package com.ivy.wechatforclient.activity;

import android.content.Intent;
import android.os.Bundle;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.ivy.wechatforclient.R;

/**
 * Created by Lenovo on 2017/12/6.
 */

public class ConcreteActivity extends AppCompatActivity {
    private TextView tv_telephone;
    private TextView tv_username;
    private Button btn_sendMsg;
    private Intent data;
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_concrete);

        tv_telephone = (TextView) findViewById(R.id.tv_telephone);
        tv_username = (TextView) findViewById(R.id.tv_username);
        data = getIntent();
        tv_telephone.setText("微信号 ： " + data.getStringExtra("telephone"));
         tv_username.setText("昵   称 ：  " + data.getStringExtra("username"));
    }

    public void sendMsg(View v) {
        Intent intent = new Intent(this,ChatActivity.class);
        intent.putExtra("sender",data.getStringExtra("owner_tel"));
        intent.putExtra("receiver",data.getStringExtra("telephone"));
        intent.putExtra("username",data.getStringExtra("username"));
        startActivity(intent);
    }
}
